<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="generator" content="Doxygen 1.8.10" />
    <title>ZRDDS: ResourceLimitsQosPolicy类 参考</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
    <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <link href="static/css/bootstrap.css" rel="stylesheet" />
    <!-- <link href="static/css/sticky-footer-navbar.css" rel="stylesheet">
    <script type="text/javascript" src="static/js/bootstrap.js"></script> -->
    <script type="text/javascript" src="static/js/doxy-boot.js"></script>
</head>
<body>
    <div id="top">
        <!-- do not remove this div, it is closed by doxygen! -->
        <!-- end header part --><!-- 制作者 Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li><a href="namespaces.html"><span>包</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="examples.html"><span>示例</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="#pub-static-attribs">静态 Public 属性</a> &#124;
<a href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">ResourceLimitsQosPolicy类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>资源限制配置。  
 <a href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#details">更多...</a></p>
<div class="dynheader">
类 ResourceLimitsQosPolicy 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.png" usemap="#ResourceLimitsQosPolicy_map" alt=""/>
  <map id="ResourceLimitsQosPolicy_map" name="ResourceLimitsQosPolicy_map">
<area href="classcom_1_1zrdds_1_1infrastructure_1_1_qos_policy.html" title="Qos的基类 " alt="QosPolicy" shape="rect" coords="0,0,155,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a4c2a87a4767b93d595412a245ae0ad8d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a4c2a87a4767b93d595412a245ae0ad8d">max_samples</a> = -1</td></tr>
<tr class="memdesc:a4c2a87a4767b93d595412a245ae0ad8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">所有数据实例下存储的数据样本的最大数量。  <a href="#a4c2a87a4767b93d595412a245ae0ad8d">更多...</a><br /></td></tr>
<tr class="separator:a4c2a87a4767b93d595412a245ae0ad8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8abf22613afeea9617c5db7cbe48b8e2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a8abf22613afeea9617c5db7cbe48b8e2">max_instances</a> = -1</td></tr>
<tr class="memdesc:a8abf22613afeea9617c5db7cbe48b8e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">所有数据实例的最大数量。  <a href="#a8abf22613afeea9617c5db7cbe48b8e2">更多...</a><br /></td></tr>
<tr class="separator:a8abf22613afeea9617c5db7cbe48b8e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a461fe85981c6ca60f1c615307e4ff213"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a461fe85981c6ca60f1c615307e4ff213">max_samples_per_instance</a> = -1</td></tr>
<tr class="memdesc:a461fe85981c6ca60f1c615307e4ff213"><td class="mdescLeft">&#160;</td><td class="mdescRight">单个数据实例下存储的最大样本个数。  <a href="#a461fe85981c6ca60f1c615307e4ff213">更多...</a><br /></td></tr>
<tr class="separator:a461fe85981c6ca60f1c615307e4ff213"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa03d2f68369768c8055d5838b3d73562"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#aa03d2f68369768c8055d5838b3d73562">initial_samples</a> = 0</td></tr>
<tr class="memdesc:aa03d2f68369768c8055d5838b3d73562"><td class="mdescLeft">&#160;</td><td class="mdescRight">样本池中的最少样本数量。  <a href="#aa03d2f68369768c8055d5838b3d73562">更多...</a><br /></td></tr>
<tr class="separator:aa03d2f68369768c8055d5838b3d73562"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84467ff530dd3c550d483432a5d130c6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a84467ff530dd3c550d483432a5d130c6"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a84467ff530dd3c550d483432a5d130c6">max_prealloc_sample_size</a> = 0</td></tr>
<tr class="memdesc:a84467ff530dd3c550d483432a5d130c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of the maximum prealloc sample. <br /></td></tr>
<tr class="separator:a84467ff530dd3c550d483432a5d130c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
静态 Public 属性</h2></td></tr>
<tr class="memitem:ad04230e0956f0c23883cc8ba653fbf4b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad04230e0956f0c23883cc8ba653fbf4b"></a>
static final int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#ad04230e0956f0c23883cc8ba653fbf4b">LENGTH_UNLIMITED</a> = -1</td></tr>
<tr class="memdesc:ad04230e0956f0c23883cc8ba653fbf4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">表示无限 <br /></td></tr>
<tr class="separator:ad04230e0956f0c23883cc8ba653fbf4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>资源限制配置。 </p>
<p>对于 <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy.html#a5f2133fec0d550eb7abd2b69b8ec6e0a" title="数据实例队列类型类型配置。 ">HistoryQosPolicy.kind</a> == <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html#a74577cf78de2e38cb7955748a1f7b150" title="尝试保存所有样本数据类型。 ">HistoryQosPolicyKind.KEEP_ALL_HISTORY_QOS</a> 的实体该 Qos 决定了实体内部（ 数据写者、数据读者）用于存储数据的资源使用量，若没有该限制，则ZRDDS可能会导致内存的无限增长， 引发内存不足的系统异常。 </p><table class="doxtable">
<tr>
<th>成员 </th><th>默认值 </th><th>匹配规则检查 </th><th>有效性检查 </th><th>兼容性检查 </th><th>可变性检查  </th></tr>
<tr>
<td><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a4c2a87a4767b93d595412a245ae0ad8d" title="所有数据实例下存储的数据样本的最大数量。 ">max_samples</a> </td><td><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#ad04230e0956f0c23883cc8ba653fbf4b" title="表示无限 ">LENGTH_UNLIMITED</a> </td><td>无 </td><td><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a4c2a87a4767b93d595412a245ae0ad8d" title="所有数据实例下存储的数据样本的最大数量。 ">max_samples</a> &gt; 0 </td><td><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a4c2a87a4767b93d595412a245ae0ad8d" title="所有数据实例下存储的数据样本的最大数量。 ">max_samples</a> &gt; <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a461fe85981c6ca60f1c615307e4ff213" title="单个数据实例下存储的最大样本个数。 ">max_samples_per_instance</a> </td><td>不可变 </td></tr>
<tr>
<td><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a8abf22613afeea9617c5db7cbe48b8e2" title="所有数据实例的最大数量。 ">max_instances</a> </td><td><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#ad04230e0956f0c23883cc8ba653fbf4b" title="表示无限 ">LENGTH_UNLIMITED</a> </td><td>无 </td><td><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a8abf22613afeea9617c5db7cbe48b8e2" title="所有数据实例的最大数量。 ">max_instances</a> &gt; 0 </td><td>无 </td><td>不可变 </td></tr>
<tr>
<td><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a461fe85981c6ca60f1c615307e4ff213" title="单个数据实例下存储的最大样本个数。 ">max_samples_per_instance</a> </td><td><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#ad04230e0956f0c23883cc8ba653fbf4b" title="表示无限 ">LENGTH_UNLIMITED</a> </td><td>无 </td><td><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a461fe85981c6ca60f1c615307e4ff213" title="单个数据实例下存储的最大样本个数。 ">max_samples_per_instance</a> &gt; 0 </td><td><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy.html#acb5ba97551079e0b072c62c21d784ac5" title="当 kind == HistoryQosPolicyKind.KEEP_LAST_HISTORY_QOS 数据实例队列的最大长度。 ">HistoryQosPolicy.depth</a> &lt;= <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a461fe85981c6ca60f1c615307e4ff213" title="单个数据实例下存储的最大样本个数。 ">max_samples_per_instance</a> &lt; <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a4c2a87a4767b93d595412a245ae0ad8d" title="所有数据实例下存储的数据样本的最大数量。 ">max_samples</a> </td><td>不可变 </td></tr>
<tr>
<td><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#aa03d2f68369768c8055d5838b3d73562" title="样本池中的最少样本数量。 ">initial_samples</a> </td><td>1 </td><td>无 </td><td><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#aa03d2f68369768c8055d5838b3d73562" title="样本池中的最少样本数量。 ">initial_samples</a> &gt;= 0 </td><td>无 </td><td>不可变 </td></tr>
</table>
</div><h2 class="groupheader">类成员变量说明</h2>
<a class="anchor" id="aa03d2f68369768c8055d5838b3d73562"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int initial_samples = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>样本池中的最少样本数量。 </p>
<p>在数据读者端使用，为优化接收性能，ZRDDS底层维护样本池，避免重复的创建、删除样本，该成员配置样本池中最少的个数，在归还 数据样本时，当池中样本个数大于该值时，数据样本所占空间将归还给操作系统，否则该数据样本归还到样本池中。 </p>

</div>
</div>
<a class="anchor" id="a8abf22613afeea9617c5db7cbe48b8e2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int max_instances = -1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>所有数据实例的最大数量。 </p>
<p>在数据读者端，在存储待存储区的数据样本时，将首先检查底层存储的所有数据实例的个数是否达到该值并且待存储 的样本是否是新的数据实例，如果不满足上述两个条件，则未达到该限制，继续下一步，如果满足以上两个条件， 数据读者将尝试清理已经存在的数据实例，数据实例清理的条件：</p><ul>
<li>数据实例的状态为 <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_instance_state_kind.html#a0ddab9c7e2ed6bb60880804cf635c50b" title="此状态表示样本所属数据实例处于被注销状态。 ">InstanceStateKind.NOT_ALIVE_NO_WRITERS_INSTANCE_STATE</a> ；</li>
<li>数据实例下的数据样本数量为0；</li>
</ul>
<p>如果清理数据实例失败，则由于该限制，数据读者将通知用户该样本被拒绝（ <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_sample_rejected_status_kind.html#a1eb02263fcf5e0126936bb43f88b5a5a" title="数据样本由于 ResourceLimitsQosPolicy.max_instances 原因被拒绝。 ">SampleRejectedStatusKind.REJECTED_BY_INSTANCE_LIMIT</a> ）以及丢失，且该样本不会通过重传获得。</p>
<dl class="section note"><dt>注解</dt><dd>不采用与 <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a461fe85981c6ca60f1c615307e4ff213" title="单个数据实例下存储的最大样本个数。 ">max_samples_per_instance</a> 不足时的处理方式（等待有数据实例空间时再存储并通知用户） 的原因在于，::max_samples_per_instance 限制可以由数据读者操作主动解除，如：调用 DataReader.take 方法，而解除 <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a8abf22613afeea9617c5db7cbe48b8e2" title="所有数据实例的最大数量。 ">max_instances</a> 的限制，必须由数据写者端发出状态报文或者与某个数据实例有关的数据写者变为 非存活状态，如果采用相同的处理方式，则在到达 <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html#a4c2a87a4767b93d595412a245ae0ad8d" title="所有数据实例下存储的数据样本的最大数量。 ">max_samples</a> 之后，会导致状态报文被拒绝，而永远无法解除限制。 </dd></dl>

</div>
</div>
<a class="anchor" id="a4c2a87a4767b93d595412a245ae0ad8d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int max_samples = -1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>所有数据实例下存储的数据样本的最大数量。 </p>
<p>在数据读者端，收到底层的数据样本后，将首先检查底层存储的所有样本个数是否达到该值，如果未达到，则将保存 到数据读者的待存储区（由于还未进行样本顺序以及其他资源限制的检查，还不能通知用户来获取该数据），并反馈数据写者 该数据样本已收到，当存储的样本个数已经达到该值，则取决于 <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_reliability_qos_policy.html#ae5d7f4b47ac41118509f42df7f11e14f" title="可靠性配置类型。 ">ReliabilityQosPolicy.kind</a> 以及 <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy.html#a5f2133fec0d550eb7abd2b69b8ec6e0a" title="数据实例队列类型类型配置。 ">HistoryQosPolicy.kind</a> 的配置，底层将采取不同的行为。</p><ul>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_reliability_qos_policy_kind.html#a78a02e421686e5297010e4c334cfc29f" title="可靠配置。 ">ReliabilityQosPolicyKind.RELIABLE_RELIABILITY_QOS</a> &amp;&amp; <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html#a74577cf78de2e38cb7955748a1f7b150" title="尝试保存所有样本数据类型。 ">HistoryQosPolicyKind.KEEP_ALL_HISTORY_QOS</a><ul>
<li>样本被拒绝（ <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_sample_rejected_status_kind.html#a288efcf33c28c121f2f2a15e2cfaf36a" title="数据样本由于 ResourceLimitsQosPolicy.max_samples 原因被拒绝。 ">SampleRejectedStatusKind.REJECTED_BY_SAMPLES_LIMIT</a> ）并且会请求数据写者端重新发送该样本，取决于数据写者的QoS设置，该样本最终可能重新被发送以及 被通知已经在数据写者端被移除，导致该样本丢失。</li>
</ul>
</li>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_reliability_qos_policy_kind.html#a78a02e421686e5297010e4c334cfc29f" title="可靠配置。 ">ReliabilityQosPolicyKind.RELIABLE_RELIABILITY_QOS</a> &amp;&amp; <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html#ae8f8d874270b6d22cc6190512cc3715b" title="保存最新样本数据类型。 ">HistoryQosPolicyKind.KEEP_LAST_HISTORY_QOS</a><ul>
<li>数据读者以数据实例的唯一标识大小顺序尝试清理可用的空间，只要样本未被用户租借出去（DataReader.read/take系列方法） 即满足清理条件，如果清理失败，则拒绝该样本（ <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_sample_rejected_status_kind.html#a288efcf33c28c121f2f2a15e2cfaf36a" title="数据样本由于 ResourceLimitsQosPolicy.max_samples 原因被拒绝。 ">SampleRejectedStatusKind.REJECTED_BY_SAMPLES_LIMIT</a> ）；</li>
</ul>
</li>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_reliability_qos_policy_kind.html#ae7bfc3fc6445be57eb991e725c1244f1" title="尽力而为配置。 ">ReliabilityQosPolicyKind.BEST_EFFORT_RELIABILITY_QOS</a> 与上一种情况相同的处理方式。 </li>
</ul>

</div>
</div>
<a class="anchor" id="a461fe85981c6ca60f1c615307e4ff213"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int max_samples_per_instance = -1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>单个数据实例下存储的最大样本个数。 </p>
<p>该值只有在 <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy.html#a5f2133fec0d550eb7abd2b69b8ec6e0a" title="数据实例队列类型类型配置。 ">HistoryQosPolicy.kind</a> == <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html#a74577cf78de2e38cb7955748a1f7b150" title="尝试保存所有样本数据类型。 ">HistoryQosPolicyKind.KEEP_ALL_HISTORY_QOS</a> 时有效，否则该值被设置成 <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy.html#acb5ba97551079e0b072c62c21d784ac5" title="当 kind == HistoryQosPolicyKind.KEEP_LAST_HISTORY_QOS 数据实例队列的最大长度。 ">HistoryQosPolicy.depth</a> 的值。 取决于DDS_HistoryQosPolicy.kind 的配置，底层将采取不同的行为。</p><ul>
<li>ReliabilityQosPolicyKind.DDS_RELIABLE_RELIABILITY_QOS &amp;&amp; HistoryQosPolicyKind.DDS_KEEP_ALL_HISTORY_QOS<ul>
<li>样本被拒绝（ <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_sample_rejected_status_kind.html#a6b0e3d69a0bedff9d3d2a941f55647e7" title="数据样本由于 ResourceLimitsQosPolicy.max_samples_per_instance 原因被拒绝。 ">SampleRejectedStatusKind.REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT</a> ），并将数据存储在待存储区，等待下一次的尝试存储并通知用户；</li>
</ul>
</li>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_reliability_qos_policy_kind.html#a78a02e421686e5297010e4c334cfc29f" title="可靠配置。 ">ReliabilityQosPolicyKind.RELIABLE_RELIABILITY_QOS</a> &amp;&amp; <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html#ae8f8d874270b6d22cc6190512cc3715b" title="保存最新样本数据类型。 ">HistoryQosPolicyKind.KEEP_LAST_HISTORY_QOS</a><ul>
<li>数据读者端将尝试清理可用的空间，优先清理该数据所属的数据实例下的数据样本，如果未清理成功，则 扩大清理范围到所有的数据实例（以数据实例的唯一标识大小顺序），只要样本未被用户租借出去（ DataReader.read/take系列方法）即满足清理条件，如果清理了哦那关键失败则采取与上一步相同的处理逻辑； </li>
</ul>
</li>
</ul>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>ResourceLimitsQosPolicy.java</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>com</b></li><li class="navelem"><b>zrdds</b></li><li class="navelem"><a class="el" href="namespacecom_1_1zrdds_1_1infrastructure.html">infrastructure</a></li><li class="navelem"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_resource_limits_qos_policy.html">ResourceLimitsQosPolicy</a></li>
    <li class="footer">
      <a href="http://www.zrtechnology.com">&copy; Copyright (c) 2018 ZhenRong Technology, Inc. All rights reserved.</a>
    </li>
  </ul>
</div>
</body>
</html>
